This algorithm checks if a number typed by the user is a valid US phone number. Try as many combo's as you like! It is made using a regex pattern and using a .test to see if it passes, returning true or false.
Day 3 of "100 days of coding".
Answer...